/*
 Navicat MySQL Data Transfer

 Source Server         : sadfsdf
 Source Server Type    : MySQL
 Source Server Version : 80018
 Source Host           : localhost:3306
 Source Schema         : bigevent

 Target Server Type    : MySQL
 Target Server Version : 80018
 File Encoding         : 65001

 Date: 24/01/2021 23:51:10
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键，注意自动递增',
  `title` varchar(30) NOT NULL COMMENT '文章标题，必填',
  `content` varchar(5000) NOT NULL COMMENT '文章内容，必填',
  `cover_img` varchar(60) NOT NULL COMMENT '图片地址，必填',
  `cate_id` int(11) NOT NULL COMMENT '分类id，必填',
  `author_id` int(11) NOT NULL COMMENT '用户id，必填',
  `state` enum('已发布','草稿') NOT NULL DEFAULT '已发布' COMMENT '状态，只能填已发布或草稿，默认已发布',
  `pub_date` datetime NOT NULL COMMENT '发布时间，年月日时分秒格式',
  `is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '默认0，表示正常文章；1表示已删除文章',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of article
-- ----------------------------
BEGIN;
INSERT INTO `article` VALUES (1, '测试数据1', '测试数据11测试数据11测试数据11', 'e8836561d4926b844b571bcacc25ea54', 1, 3, '已发布', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (2, '测试数据2', '测试数据2测试数据2测试数据2', 'bbbb.jpg', 2, 3, '已发布', '2020-11-10 23:49:05', 1);
INSERT INTO `article` VALUES (3, '测试数据3', '测试数据3测试数据3测试数据3', 'cccc.jpg', 1, 3, '草稿', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (4, '测试数据4', '测试数据4测试数据4测试数据4', 'dddd.jpg', 2, 3, '草稿', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (5, '测试数据5', '测试数据5测试数据5测试数据5', 'eeee.jpg', 2, 3, '草稿', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (6, '测试数据6', '测试数据6测试数据6测试数据6', 'ffff.jpg', 1, 3, '草稿', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (7, '测试数据7', '测试数据7测试数据7测试数据7', 'gggg.jpg', 1, 3, '已发布', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (8, '测试数据8', '测试数据8测试数据8测试数据8', 'gggg.jpg', 1, 5, '已发布', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (9, '测试数据9', '测试数据9测试数据9测试数据9', 'hhhh.jpg', 2, 3, '已发布', '2020-11-10 23:49:05', 1);
INSERT INTO `article` VALUES (10, '测试数据10', '测试数据10测试数据10测试数据10', 'iiii.jpg', 2, 3, '已发布', '2020-11-10 23:49:05', 0);
INSERT INTO `article` VALUES (11, '测试数据11', '测试数据11测试数据11测试数据11', '3b325644d73821539a95ae542fd40132', 1, 3, '已发布', '2020-11-11 10:12:52', 0);
INSERT INTO `article` VALUES (12, '测试数据12', '测试数据12测试数据12测试数据12\n<p>乱我心者，今日之日多烦忧。</p>\n<p>长风万里送秋雁，对此可以酣高楼。</p>\n<p>&nbsp;</p>', 'ea29a7d51a4736a8c128e849f7f74b8d', 4, 3, '草稿', '2020-11-11 10:58:26', 0);
INSERT INTO `article` VALUES (13, '测试数据13', '测试数据11测试数据11测试数据11', '7f83de516c218ba916e184560550f83e', 1, 3, '已发布', '2020-12-12 12:10:29', 0);
INSERT INTO `article` VALUES (14, '测试数据14', '测试数据11测试数据11测试数据11', '9684167b88c55eb9591538e818d80003', 1, 3, '草稿', '2020-12-12 12:11:19', 0);
INSERT INTO `article` VALUES (15, '测试数据15', '测试数据11测试数据11测试数据11', 'ffc40c16dbe9a32c9490f2c29642da79', 1, 3, '草稿', '2020-12-12 12:11:38', 0);
INSERT INTO `article` VALUES (16, '测试数据16', '测试数据11测试数据11测试数据11', 'bb99c5789367274e5fe43013859991ce', 1, 3, '草稿', '2020-12-12 20:29:08', 0);
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL,
  `alias` varchar(10) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES (1, '游戏', 'geme');
INSERT INTO `category` VALUES (2, '音乐', 'music');
INSERT INTO `category` VALUES (4, '科学', 'kexue');
INSERT INTO `category` VALUES (7, '艺术', 'art');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(10) NOT NULL,
  `password` char(32) NOT NULL,
  `nickname` varchar(10) DEFAULT NULL,
  `email` varchar(30) DEFAULT NULL,
  `user_pic` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (3, 'admin', '21232f297a57a5a743894a0e4a801fc3', '大神', 'sss@qq.com', '');
INSERT INTO `user` VALUES (5, 'laotang', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
